//
//  Mine_TopicMineTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 2016/12/1.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Mine_TopicMineTableViewCell.h"

@implementation Mine_TopicMineTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.btn_select = [UIButton buttonWithType:(UIButtonTypeSystem)];
    self.btn_select.layer.cornerRadius = 5;
    self.btn_select.layer.borderWidth = 1;
//    self.btn_select.layer.borderColor = [UIColor grayColor].CGColor;
    [self.contentView addSubview:self.btn_select];
    
    self.number = [[UILabel alloc] init];
//    self.number.text = @"88888";
    self.number.textAlignment = NSTextAlignmentCenter;
    self.number.font = [UIFont systemFontOfSize:15.0f];
    self.number.textColor = [UIColor grayColor];
    [self.contentView addSubview:self.number];
    
    self.name = [[UILabel alloc] init];
//    self.name.text = @"#外勤审批#";
    self.name.textColor = [UIColor blackColor];
    self.name.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:self.name];
    
    //
    self.view_Line = [[UIView alloc] init];
    self.view_Line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_Line];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.btn_select.frame = CGRectMake(SCREEN_WIDTH - 10 - 70, 10, 70, 30);
    
    self.number.frame = CGRectMake(SCREEN_WIDTH - 90 - 50, 15, 50, 25);
    
    self.name.frame = CGRectMake(15, 15, SCREEN_WIDTH - 140 - 25, 20);
    
    self.view_Line.frame = CGRectMake(10, 48.5, SCREEN_WIDTH - 10, 1.5);
}

@end
